﻿@*@using System.Data.SQLite*@
@using doufu.Model
@{

@* var path = HttpContext.Current.Server.MapPath("/Data#base/a.db3");

    SQLiteConnection cnn = new SQLiteConnection("data source=" + path);
    cnn.Open();
          
            var d = new SQLiteCommand();
            d.Connection = cnn;
            d.CommandText = "select * from s";
            SQLiteDataAdapter ad = new SQLiteDataAdapter("select * from s", cnn);
            DataSet ds = new DataSet();
            var table = ad.Fill(ds);
<text>@ds.Tables[0].Rows.Count</text>*@

    var db = new PetaPoco.Database("SQLite");
    var list = db.Fetch<category>("");
    foreach (category category in list)
    {
    @category.category_name
    }
    
}
